<%--
  Created by IntelliJ IDEA.
  User: c
  Date: 2017-11-27
  Time: 10:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>医疗用品入库登记</title>
    <%@include file="/WEB-INF/jsp/header.jsp"%>
</head>
<style>
    table td{
        font: 14px 'microsoft yahei', 微软雅黑, Helvetica, Arial, Tahoma, 黑体, 宋体, sans-serif;
    }
    div.title-pur p{
        font-size: 15px;
        margin-bottom: 8px;
    }

</style>
<body>
<div class="container-fluid">
    <div style="text-align: center;margin-bottom: 10px;">
        <span class="h3">药品入库登记</span>
    </div>
    <div class="container-fluid" style="width: 90%;">

        <div style="font-size: 16px; margin-top: 15px;" class="row">
            <form class="form-horizontal">
                <div class="col-md-4 title-pur">
                    <div class="">
                        <label class=" col-md-4">供应商：</label>
                        <div class="form-group col-md-8">
                            <select style="width:210px;" onchange="selChange(this)" class="form-control" id="proNum" name="proNum">
                                <option value="-1">--请选择--</option>
                            </select>
                        </div>

                    </div>
                    <div class="">
                        <label class=" col-md-4">联系人：</label>
                        <div class="form-group col-md-8">
                            <p id="proPerson" style="border-bottom:1px solid black;">&nbsp;</p>
                        </div>
                    </div>
                    <div class="">
                        <label class=" col-md-4">电&nbsp;&nbsp;&nbsp;话：</label>
                        <div class="form-group col-md-8">
                            <p id="proPhone" style="border-bottom:1px solid black;">&nbsp;</p>
                        </div>
                    </div>
                </div>
                <div class="col-md-4 title-pur">
                    <div class=""  style="margin-bottom: 50px;">
                        <label class=" col-md-5">采购订单号:</label>
                        <div class="input-group">
                            <div class="input-icon-group">
                                <input type="text" readonly="readonly" class="form-control fc-clear" name="planNum"/>
                                <span id="scan" data-role="md" class="md md-center-focus-weak fa-lg input-icon input-icon-md" style="display: inline;">
                                </span>
                            </div>
                            <span class="input-group-btn">
                                <a href="#modal-id" class="btn btn-primary" data-toggle="modal" type="button" onclick="bindPlan()">
                                    查询
                                </a>
                            </span>
                        </div>
                    </div>
                    <div class="">
                        <label class=" col-md-5">购&nbsp;进&nbsp;日&nbsp;期:</label>
                        <div class="form-group col-md-7">
                            <p style="border-bottom:1px solid black;" class="gouplanDate">&nbsp;</p>
                        </div>
                    </div>
                </div>
                <div class="col-md-4 title-pur">
                    <div class="">
                        <label class=" col-md-5">单据编号:</label>
                        <div class="form-group col-md-7">
                            <p style="border-bottom:1px solid black;" class="dsNum">&nbsp;</p>
                        </div>
                    </div>
                    <div class="">
                        <label class=" col-md-5">制单日期:</label>
                        <div class="form-group col-md-7">
                            <p style="border-bottom:1px solid black;" class="planDate">&nbsp;</p>
                        </div>
                    </div>
                    <div class="">
                        <label class=" col-md-5">制单人员:</label>
                        <div class="form-group col-md-7">
                            <p style="border-bottom:1px solid black;" class="dsVerifier">${sessionScope.loginUser.woName}</p>
                        </div>
                    </div>
                </div>
            </form>
            <table id="delTable" class="table table-bordered table-striped">
                <tr>
                    <td colspan="9" class="text-right" style="color: red;">请把入库信息补填完整</td>
                </tr>
                <tr class="back">
                    <th>药品编号</th>
                    <th >药品名称</th>
                    <th >规格</th>
                    <th >订购数量</th>
                    <th>购进价格</th>
                    <th>药品批号</th>
                    <th >生产日期</th>
                    <th >有效日期</th>
                    <th>
                        操作
                    </th>
                </tr>
            </table>

            <div class="text-right caoz"  style="margin-top: 40px;display: none;">
                <%--<button type="button" data-content="批量补货，只能补货一定量!" data-original-title="批量进行补货" class="btn btn-success ru" onclick="addDrugsto()">验收入库</button>--%>
                    <button type="button"
                            title="操作提示" data-container="body"
                            data-toggle="popover" data-placement="left"
                            data-content="请务必要把入库信息填写完整!"
                            class="btn btn-success ru" onclick="addDrugsto()"
                    >
                        验收入库
                    </button>
            </div>
        </div>
    </div>
    <div id="choosePlan" style="display: none;" style="width: 100%;">
        <div class="modal fade" id="modal-id" style="width: 100%;">
            <div class="modal-dialog" style="width: 100%;">
                <div class="modal-content" style="width: 100%;">
                    <div class="modal-header">
                        <button type="button"  class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h2 style="font-size: 18px;font-weight: bold;">采购订单</h2>
                    </div>
                    <div class="modal-body" style="width: 100%;">
                        <div>
                            <blockquote class="layui-elem-quote">
                                <button type="button" class="layui-btn layui-btn-small" id="add" onclick="addpur()">
                                    <i class="layui-icon"></i> 选择
                                </button>
                                <button type="button" onclick="colseDels(this)" class="layui-btn layui-btn-danger layui-btn-small" id="closedels">
                                    禁止显示明细
                                </button>
                            </blockquote>
                        </div>
                        <div style="height: 35%;">
                            <table id="purPlanTable"
                                   data-pagination-pre-text="上一页"
                                   data-pagination-next-text="下一页"
                                   data-click-to-select="true"
                                   data-toggle="table"
                                   data-url="${ctx}/drug/getPurPlan?planChstate=1&planRustate=0"
                                   data-striped="true"
                                   data-toolbar-align="right"
                                   data-pagination="true"
                                   data-side-pagination="server"
                                   data-page-size="10"
                            >
                                <thead>
                                <tr>
                                    <th data-radio="true"></th>
                                    <th data-field="planNum">采购编号</th>
                                    <th data-field="planDate">采购日期</th>
                                    <th data-field="worker.woName">采购员</th>
                                    <th data-field="provider.proName">药商</th>
                                    <th data-field="planRustate" data-formatter="initruState">入库状态</th>
                                    <th data-field="planChstate" data-formatter="initState" data-events="optEvents">审核</th>
                                </tr>
                                </thead>
                            </table>

                        </div>
                        <div style=" margin-top: 70px; padding-bottom: 50px;">
                            <table id="purDelsTable" class="table table-bordered table-striped">
                                <tr class="back">
                                    <th >药品名称</th>
                                    <th >规格</th>
                                    <th >购进数量</th>
                                    <th >单位</th>
                                    <th >剂型</th>
                                    <th >零售价(元)</th>
                                </tr>
                            </table>

                        </div>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
    </div>
    <div class="dsdDia" style="display: none;">
        <form id="dsdForm" class="form-horizontal">
            <div class="form-group">
                <label for="" class="control-label col-md-4">药品编号：</label>
                <div class="form-group col-md-5">
                    <input readonly="readonly" type="text" name="drugNum" class="form-control">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-md-4">药品名称：</label>
                <div class="form-group col-md-5">
                    <input  readonly="readonly" type="text" name="drugName" class="form-control">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-md-4">药品批号：</label>
                <div class="form-group col-md-5">
                    <input  type="text" name="dsdLotnum" class="form-control">
                </div>
                <p class=" col-md-3" style="line-height: 34px; ">
                    <i style="color: red;">*</i>
                    <span class="checkWarranty"></span>
                </p>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-md-4">生产日期：</label>
                <div class="form-group col-md-5">
                    <input  type="text" name="stoMfg" class="form-control">
                </div>
                <p class=" col-md-3" style="line-height: 34px; ">
                    <i style="color: red;">*</i>
                    <span class="checkWarranty"></span>
                </p>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-md-4">有效日期：</label>
                <div class="form-group col-md-5">
                    <input type="text" name="dsdValiddate" class="form-control">
                </div>
                <p class=" col-md-3" style="line-height: 34px; ">
                    <i style="color: red;">*</i>
                    <span class="checkWarranty"></span>
                </p>
            </div>
        </form>
    </div>
    <%@include file="/WEB-INF/jsp/footer.jsp"%>
    <script src="${ctx}/statics/js/bootstrap-tooltip.js"></script>
    <script src="${ctx}/statics/js/bootstrap-popover.js"></script>
    <script src="${ctx}/res/js/drug_add.js"></script>
</div>
</body>
</html>
